package com.fmyd.qizhuazhua.fusion;

import android.annotation.SuppressLint;
import android.os.Environment;

import com.fmyd.qizhuazhua.MyApplication;
import com.fmyd.qizhuazhua.utils.ApkUtil;

import java.io.File;

/**
 * 文 件 名:  FusionCode.java
 * 描    述:  全局常量
 * 创 建 人:  dingyu
 * 创建时间:  2015-10-13
 */
@SuppressLint("SdCardPath")
public class FusionCode {


    // 请求服务器静态页面地址
    public static String SERVER_STATIC_ADDR = "http://static.7gyou.com/";

    // 请求服务器静态页面地址
    public static String SERVER_HIDE_PACKAGE = "https://app.7gyou.com/qgyhtml/hidePackages/hidPackage.html";

    // 请求服务器分享图片地址
    public static String SERVER_SHARE_ADDR = "http://121.201.103.2/";

    //    // 请求服务器地址
    public static String SERVER_ADDR = ApkUtil.getMetaDataValue(MyApplication.instance, "APP_BASE_URL");

    public static String SERVER_JD_ADDR = ApkUtil.getMetaDataValue(MyApplication.instance, "APP_JD_URL_VALUE");

    // 请求服务器接口地址
    public static String SERVER_INTERFACE_ADDR = SERVER_ADDR.concat(ApkUtil.getMetaDataValue(MyApplication.instance, "APP_INTERFACE"));

    // 游戏SDK支付地址
    public static String SERVER_SDK_PAY_INTERFACE_ADDR = SERVER_ADDR.concat(ApkUtil.getMetaDataValue(MyApplication.instance, "APP_SDK_PAY_INTERFACE"));

    //OSS
    public static final String API_OSS_BUCKET = ApkUtil.getMetaDataValue(MyApplication.instance, "OSS_BUCKET");

    public static final String API_OSS_HOST_ADDRESS = ApkUtil.getMetaDataValue(MyApplication.instance, "OSS_BASE_URL");

    public static final String API_CDN_HOST_ADDRESS = ApkUtil.getMetaDataValue(MyApplication.instance, "CDN_BASE_URL");

    //网络图片获取，前置地址
    public static final String API_OSS_BASE_URL = String.format("http://%s.".concat(API_OSS_HOST_ADDRESS).concat("/"), API_OSS_BUCKET);

    // 下载图片地址
    public static String DOWNLOAD_IMG_ADDR = "";

    // 上传图片地址
    public static String UPLOAD_IMG_ADDR = "";

    // 存储图片的SDCard路径
    public static final String SD_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator;

    // 存储图片的sdcard目录
    public static final String FILE_DIR = "qgy/";

    // 存储下载APK保存的目录
    public static final String APK_SAVE_FILE_DIR = FILE_DIR + "download/apk";

    // 存储路径
    public static final String SAVE_PATH = SD_PATH + FILE_DIR;

    // 下载文件保存路径
    public static final String DOWNLOAD_SAVE_PATH = SAVE_PATH + "download/";

    public static final String DATABASE_PATH = SAVE_PATH + "database/";

    public static final String CACHE_PATH = SAVE_PATH + "cache/";

    public static final String APP_TMP_CATALOG = FILE_DIR + File.separator + "tmp";

    // 下载保存APK路径
    public static final String DOWNLOAD_SAVE_APK_PATH = DOWNLOAD_SAVE_PATH + "apk/";

    // 下载保存图片路径
    public static final String DOWNLOAD_SAVE_IMAGE_PATH = DOWNLOAD_SAVE_PATH + "images/";

    //缓存图片保存地址
    public static final String CACHE_IMAGE_PATH = CACHE_PATH + "images/";

    //缓存小视屏保存地址
    public static final String CACHE_VIDEO_PATH = CACHE_PATH + "video/";

    // 用户是否第一次进入软件,默认为true
    public static final String IS_FIRST_IN = "is_first_in";

    // 极光注册id，唯一标识
    public static final String JPUSH_REGIST_ID = "jpushRegistId";

    // 分享红包
    public static final String SHARE_RED_PACKAGE = "share_red_package";

    // 选择城市
    public static final String SELECTED_CITY = "selected_city";

    //定位的城市
    public static final String LOCATION_CITY = "selected_city2";

    //定位的城市
    public static final String LOCATION_ADDRESS = "location_address";

    // 选择的城市是否有门店
    public static final String SELECTED_CITY_HAS_STORE = "selected_city_has_store";

    // 用户头像
    public static final String USER_HEAD_PORTRAIT_INDEX = "user_head_portrait_index";

    public static final String USER_HEAD_PORTRAIT = "user_head_portrait";

    // 登陆的用户名
    public static final String LOGIN_USER_NAME = "login_user_name";

    // 用户名
    public static final String USER_NAME = "user_name";

    // 用户id  
    public static final String USER_ID = "user_id";

    // 用户昵称
    public static final String USER_NICKNAME = "user_nickname";

    // 用户手机号
    public static final String USER_PHONE = "user_phone";

    // 登录的用户手机号
    public static final String LOGIN_USER_PHONE = "login_user_phone";

    // 用户密码
    public static final String USER_PASSWORD = "user_password";

    // 用户QQ绑定UUid
    public static final String USER_QQ_UUID = "user_qq_uuid";

    // 用户微信绑定UUid
    public static final String USER_WX_UUID = "user_wx_uuid";

    // 用户身份证号
    public static final String USER_ID_CARD_NUM = "user_id_card_num";

    // 用户性别
    public static final String USER_SEX = "user_sex";

    // 用户token
    public static final String TOKEN = "token";

    // 用户登录状态
    public static final String LOGIN_STATE = "login_state";
    // 是否公告卡
    public static final String ISPUBLIC = "ispubliccard";
    // 是否公告卡
    public static final String IS_HIDE_PACKAGE = "is_hide_package";
    // 注册时的验证码
    public static final String REGIST_VERCODE = "regist_vercode";

    // 注册时的验证码时间
    public static final String REGIST_VERCODE_TIME = "regist_vercode_time";

    // 忘记密码的验证码
    public static final String FIND_PSW_VERCODE = "find_psw_vercode";

    // 忘记密码的验证码时间
    public static final String FIND_PSW_VERCODE_TIME = "find_psw_vercode_time";

    // 验证码失效时间为5分钟
    public static final int VERCODE_LOSE_TIME = 5 * 60 * 1000;

    // 网络请求成功结果参数1
    public static final int SUCCESS_RESULT = 1;

    // 网络请求错误结果参数1
    public static final int ERROR_RESULT = -1;

    // 网络请求图片标识(0表示默认图片，1表示网络获取图片，2表示缓存图片，3表示本地已下载图片，-1表示错误图片)
    public static final int DEFAULT_IMG = 0;

    public static final int NET_ERROR_IMG = -1;

    public static final int NET_CRORECT_IMG = 1;

    public static final int CACHE_IMG = 2;

    public static final int NATIVE_IMG = 3;

    // 开始定位
    public final static int MSG_LOCATION_START = 0;

    // 定位完成
    public final static int MSG_LOCATION_FINISH = 1;

    // 停止定位
    public final static int MSG_LOCATION_STOP = 2;

    // 套餐
    public static final String PACKAGES_ID = "packages_id";
    // 隐藏套餐UUid
    public static final String UNIQUE_QR_CODE = "uniqueQRCode";

    // 资讯
    public static final String NEWS_ID = "news_id";
    public static final String NEWS_TYPE = "news_type";

    // 活动
    public static final String ACTIVITY_ID = "activity_id";

    // 游戏
    public static final String GAME_ID = "game_id";

}
